package counter.com.connproperty.Trojan;

import lombok.Data;

import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

@Data
public class TrojanAddProperty {
    @NotBlank(message = "目标名不为空")
    String targetname;
    @Pattern(regexp = "(((\\d{1,2})|(1\\d{1,2})|(2[0-4]\\d)|(25[0-5]))\\.){3}((\\d{1,2})|(1\\d{1,2})|(2[0-4]\\d)|(25[0-5]))", message = "ip不合法")
    String dstip;
    @DecimalMax(value = "65535", message = "端口号不能大于65535")
    @DecimalMin(value = "100", message = "端口号不能小于100")
    String dstport;
    @NotBlank(message = "文件名不能为空")
    String exefilename;
    @NotBlank(message = "文件路径不能为空")
    String exefilepath;
    @NotBlank(message = "上传文件名不能为空")
    String uploadfilename;
    @NotBlank(message = "上传路径不能为空")
    String uploadfilepath;
}
